package com.orphan.limitedDeal.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.orphan.limitedDeal.po.PromotionGoodss;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Repository;

import java.util.List;
@Repository("PromotionMapper")
public interface PromotionMapper extends BaseMapper<PromotionGoodss> {
    /**
     * 查询上架与促销商品
     */
    List<PromotionGoodss> selectAll();
    /**
     * 修改促销商品的折扣价格或促销状态
     */
    int updateGoods(PromotionGoodss promotionGoodss);
    //取消促销
    int setTag(PromotionGoodss promotionGoodss);
    /**
     * 根据商品名称进行搜索
     */
    List<PromotionGoodss> selectGoodsName(String goodsName);
    /**
     * 查找促销商品
     */
    List<PromotionGoodss> selectPromotion();

//    @Override
//    int insert(PromotionGoodss entity);
}
